import request from '@/utils/request';

import { BASE_URL, OPS_URL } from '@/config/query';

// const BASE_URL = '/api'
export async function queryPage(params) {
	return request(`${BASE_URL}/device_state/page`, params);
}

export async function queryInfoById(params) {
	return request(`${BASE_URL}/device_state/detail`, params);
}

export async function queryHistoryPage(params) {
	return request(`${BASE_URL}/device_state_record/page`, params);
}

export async function queryHistoryInfoById(id) {
	return request(`${BASE_URL}/device_state_record/detail`, { id });
}

export async function queryDictName(params) {
	return request(`${OPS_URL}/dict/permission_none/name`, params);
}

// 报警台账导出、分享
export async function exportFile(params) {
	return request(`${BASE_URL}/device_state_share/export`, params);
}
